﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Linq.Autocompiler.EF4
{
    public class ParameterValueContainer
    {
        public object Value0 { get; set; }
        public object Value1 { get; set; }
        public object Value2 { get; set; }
        public object Value3 { get; set; }
        public object Value4 { get; set; }
        public object Value5 { get; set; }
        public object Value6 { get; set; }
        public object Value7 { get; set; }
        public object Value8 { get; set; }
        public object Value9 { get; set; }
        public object Value10 { get; set; }
        public object Value11{ get; set; }
        public object Value12 { get; set; }
        public object Value13 { get; set; }
        public object Value14 { get; set; }
        public object Value15 { get; set; }
        public object Value16 { get; set; }
        public object Value17 { get; set; }
        public object Value18 { get; set; }
        public object Value19 { get; set; }

        public static ParameterValueContainer Create(object[] p)
        {
            var container = new ParameterValueContainer();
            for (int i = 0; i < p.Length; i++)
            {
                container.GetType().GetProperty("Value" + i).SetValue(container, p[i],null);
            }
            return container;
        }
    }
}
